package com.chb.test.waitAndnotify_08;

public class ThreadDemo {
    public static void main(String[] args) {
        // 生产者和消费者
        // 实现线程轮流交替执行的效果
        Cook cook = new Cook();
        Foodie foodie = new Foodie();
        cook.setName("厨师");
        foodie.setName("吃货");
        cook.start();
        foodie.start();
    }
}
